home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9722 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.mira.net.au!news
  2. From: davidw@werple.net.au (David White)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: polymorphism and style
  5. Date: 4 Mar 1996 20:21:16 +1100
  6. Organization: Werple Internet, Melbourne
  7. Message-ID: <4hecmc$qhb@werple.net.au>
  8. References: <4gr4ur$n13@alpha.pcix.com> <DnI6II.KMt@news.arco.com> <4h4h3h$6ur@brtph500.bnr.ca> <4has16$cge@werple.net.au> <4hav3b$m26@news2.delphi.com>
  9. NNTP-Posting-Host: werple.mira.net.au
  10.  
  11. I agree with all your comments, except that I suspect the necessary
  12. requirement of downcasts depends to a large degree on the application. In
  13. one application in particular, I have to deal with much of the type
  14. information not being known until run time. It doesn't have a lot of
  15. downcasting, but what it has usually results from collections of pointers
  16. to objects, often read from disk, which can exhibit most of their
  17. behaviour by accessing the base class only, but occasionally some
  18. derived-class operations, inappropriate for the base class, need to be
  19. called upon. Of course, this doesn't mean it couldn't be re-designed
  20. without almost no downcasting, but I believe the general-purpose nature of
  21. the present design, despite the downcasting, is overall an advantage. 
  22.  
  23. David White
  24. davidw@werple.mira.net.au
  25.